package com.lamer.console.demo;

import lombok.AllArgsConstructor;
import lombok.ToString;

@AllArgsConstructor
@ToString
public class Example<T> {

    private T foo;
    private String bar;

    public static ExampleBuilder builder(){
        return new ExampleBuilder();
    }

    public static class ExampleBuilder<T>{
        private T foo;
        private String bar;

        public ExampleBuilder(){

        }

        public ExampleBuilder foo(T foo){
            this.foo = foo;
            return this;
        }

        public ExampleBuilder bar(String bar){
            this.bar = bar;
            return this;
        }

        public Example build(){
            return new Example(this.foo, this.bar);
        }
    }
}
